import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";

import "./assets/normalize.css";

Vue.config.productionTip = false;

// 初始化时检查用户登录状态，确保在路由导航前完成
store.dispatch("checkAuth").then(() => {
  new Vue({
    router,
    store,
    render: (h) => h(App),
  }).$mount("#app");
});
